<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../../include/admincontent.jsp" %>
<div id="location">当前位置：首页 > 招聘实施 > 高校校园招聘 > 录入毕业生信息</div>
<div id="Content">
    <div class="btnbar">
        <button type="button" class="users" id="do_gximport">录入毕业生</button>
        <button type="button" class="list" id="do_gximport_next">进入下一步</button>
        <button type="button" class="back" onclick="javascript:history.go(-1);">返 回</button>
    </div>

    <!-- 录入毕业生 -->
    <div id="importpanel" class="condition_cont">
        <form id="gxexcelValid" method="post" action="/Do/GXImport/ImportAction" enctype="multipart/form-data">
            <input type="hidden" name="pid" value="${pid}"/>
            <input type="hidden" name="fid" value="${fid}"/>
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">选择文件：</td>
                    <td width="200">
                        <div>
                            <input type="file" name="excel" datatype="*" nullmsg="请选择excel文件！"/>
                        </div>
                    </td>
                    <td><a href="/resources/template/高校毕业生信息采集表模版.xls">点击下载Excel模版文件</a></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <button type="submit" class="save">提 交</button>
                    </td>
                    <td></td>
                </tr>
                </thead>
            </table>
        </form>
    </div>


    <!-- 筛选条件 -->
    <div id="searchbox">
        <form id="sform">
            <input type="hidden" name="pid" value="${pid}"/>
            <input type="hidden" name="deptcode" value="${deptcode}"/>
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">毕业院校：</td>
                    <td width="150">
                        <div><input type="text" name="university"/></div>
                    </td>
                    <td width="60">所学专业：</td>
                    <td width="150">
                        <div><input type="text" name="major"/></div>
                    </td>
                    <td width="40"></td>
                    <td></td>
                </tr>
                <tr>
                    <td>学生姓名：</td>
                    <td>
                        <div><input type="text" name="name"/></div>
                    </td>
                    <td>身份证号：</td>
                    <td>
                        <div><input type="text" name="code"/></div>
                    </td>
                    <td>
                        <button id="searchbtn" type="button" class="search"></button>
                    </td>
                    <td></td>
                </tr>
                </thead>
            </table>
        </form>
    </div>

    <table class="treeTable" id="tablelist">
        <thead>
        <tr>
            <td width="20"><input type="checkbox" class="allcheckbox" title="选择全部/取消全选"/></td>
            <td width="25">序号</td>
            <td width="50">姓名</td>
            <td width="30">性别</td>
            <td width="65">出生年月</td>
            <td width="60">政治面貌</td>
            <td width="110">身份证号</td>
            <!-- <td width="80">生源地</td> -->
            <td width="150">毕业院校</td>
            <td width="120">所学专业</td>
            <td width="60">学历</td>
            <td width="80">毕业时间</td>
            <td>联系电话</td>
            <td width="50"></td>
        </tr>
        </thead>
        <tbody id="result"></tbody>
    </table>
    <div id="page"></div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        getList();
        $('#searchbtn').click(function () {
            getList();
        });

        //录入人员
        $('#do_gximport').click(function () {
            $('#importpanel').slideToggle(300);
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
        });

        $("#gxexcelValid").Validform({
            ajaxPost: true,
            beforeSubmit: function (curform) {
                curform.ajaxSubmit({
                    type: 'post',
                    dataType: 'json',
                    success: function (data) {
                        if (data.state) {
                            getList();
                        }
                        $.Showmsg(data.Message);
                    }
                });
                return false;
            }
        });


        $('#do_gximport_next').click(function () {
            layer.confirm('是否已确认毕业生信息准确无误？', {
                btn: ['是', '否']
            }, function () {
                DelInfo('/Do/GXImport/NextAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}');
                layer.closeAll();
            }, function () {
                layer.closeAll();
            });
        });

    });

    function getList() {
        $('.page').myPagination({
            cssStyle: "pagination",
            ajax: {
                on: true,
                url: '${path}/Do/GXImport/getusers?flowid=${fid}',
                param: $('#sform').serialize(),
                dataType: 'html',
                callback: function (data) {
                    $('#result').html(data);
                }
            }
        });
    }
</script>
</body>
</html>